package me.yushuai.wukong.base.config;

import me.yushuai.wukong.base.service.ActionLogService;
import org.aspectj.lang.JoinPoint;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * @author zhoushuai@189.cn
 * @since 2023-09-19
 */
@Component
public class ActionLogWorkerFactory {

    @Autowired
    private ActionLogService actionLogService;

    public ActionLogWorker create(JoinPoint joinPoint, LocalDateTime startTime, LocalDateTime endTime) {
        return new ActionLogWorker(actionLogService, joinPoint, startTime, endTime);
    }

}
